#ifndef NctiWindowEventPubFun_H
#define NctiWindowEventPubFun_H
#include "ncti_base.h"
#include "ncti_event.h"
struct GLFWwindow;
namespace NCTI
{
	/**
	* @brief window event public function, internal use
	*/
	class NctiWindowEventPubFun
	{
	public:
		NctiWindowEventPubFun();
		virtual ~NctiWindowEventPubFun();
	public:
		/**
	   * @brief get KeyboardCode by i_key
	   * @param[in] i_key
	   * @return KeyboardCode
	   */
		static KeyboardCode get_key_code(Ncti_Integer i_key);
		/**
	   * @brief get MouseButtons by i_button
	   * @param[out] i_button
	   * @return MouseButtons
	   */
		static MouseButtons get_button_code(Ncti_Integer i_button);
		/**
	   * @brief get ModifierKeys by i_mods
	   * @param[out] i_mods
	   * @return ModifierKeys
	   */
		static ModifierKeys get_mods_code(Ncti_Integer i_mods);
		/**
	   * @brief  internal use
	   */
		static Ncti_Size encode_utf8(char* i_s, Ncti_UInteger i_ch);
		/**
	   * @brief  internal use
	   */
		static void window_size_callback(GLFWwindow* i_pGLFWwindow, Ncti_Integer i_width, Ncti_Integer i_height);
		/**
	   * @brief  internal use
	   */
		static void framebuffer_size_callback(GLFWwindow* i_pGLFWwindow, Ncti_Integer i_width, Ncti_Integer i_height);
		/**
	   * @brief  internal use
	   */
		static void window_pos_callback(GLFWwindow* i_pGLFWwindow, Ncti_Integer i_x, Ncti_Integer i_y);
		/**
	   * @brief  internal use
	   */
		static void key_callback(
			GLFWwindow* i_pGLFWwindow,
			Ncti_Integer i_key,
			Ncti_Integer i_scancode,
			Ncti_Integer i_action,
			Ncti_Integer i_mods);
		/**
	   * @brief  internal use
	   */
		static void char_callback(
			GLFWwindow* i_pGLFWwindow, 
			Ncti_UInteger i_codepoint);
		/**
	   * @brief  internal use
	   */
		static void cursor_position_callback(
			GLFWwindow* i_pGLFWwindow, 
			Ncti_Double i_x,
			Ncti_Double i_y);
		/**
	   * @brief  internal use
	   */
		static void mouse_button_callback(
			GLFWwindow* i_pGLFWwindow,
			Ncti_Integer i_button, 
			Ncti_Integer i_action,
			Ncti_Integer i_mods);
		/**
	   * @brief  internal use
	   */
		static void scroll_callback(GLFWwindow* i_pGLFWwindow,
			Ncti_Double i_x,
			Ncti_Double i_y);
		/**
	   * @brief  internal use
	   */
        static void enterleave_callback(GLFWwindow* i_pGLFWwindow, Ncti_Integer i_enter);
		/**
	   * @brief  internal use
	   */
		static void window_refresh_callback(GLFWwindow* i_pGLFWwindow);
		/**
	   * @brief  internal use
	   */
		static void window_maximize_callback(GLFWwindow* i_pGLFWwindow, Ncti_Integer i_maximized);
	};
}
#endif
